package com.cekanet.mybudget;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

@SuppressWarnings("serial")
public class StatementPageServlet extends  HttpServlet{ 
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {
		UserService userService = UserServiceFactory.getUserService();
		
		req.setAttribute("username", userService.getCurrentUser().getNickname());
		req.setAttribute("logoutURL", userService.createLogoutURL(req.getRequestURI()));
		req.getRequestDispatcher("statement.jsp").forward(req, resp);
	}
}
